.class Lcom/waiqin365/lightapp/im/activity/ci;
.super Landroid/os/Handler;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 6

    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->dismissProgressDialog()V

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/im/a/a/f;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/a/a/f;->b()Z

    move-result v1

    if-eqz v1, :cond_0

    iget-object v1, v0, Lcom/waiqin365/lightapp/im/a/a/f;->d:Ljava/lang/String;

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "/"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->f(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Lcom/hyphenate/chat/EMGroup;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMGroup;->getGroupId()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "/users"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/util/HashMap;

    invoke-direct {v2}, Ljava/util/HashMap;-><init>()V

    const-string/jumbo v3, "Authorization"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v5, "Bearer "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/a/a/f;->d:Ljava/lang/String;

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v3, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    new-instance v3, Lorg/json/JSONObject;

    invoke-direct {v3}, Lorg/json/JSONObject;-><init>()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->e:[Ljava/lang/String;

    if-eqz v0, :cond_2

    :try_start_0
    new-instance v4, Lorg/json/JSONArray;

    invoke-direct {v4}, Lorg/json/JSONArray;-><init>()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->e:[Ljava/lang/String;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->e:[Ljava/lang/String;

    array-length v0, v0

    if-lez v0, :cond_1

    const/4 v0, 0x0

    :goto_1
    iget-object v5, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    iget-object v5, v5, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->e:[Ljava/lang/String;

    array-length v5, v5

    if-ge v0, v5, :cond_1

    iget-object v5, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    iget-object v5, v5, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->e:[Ljava/lang/String;

    aget-object v5, v5, v0

    invoke-virtual {v4, v5}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    :cond_1
    const-string/jumbo v0, "usernames"

    invoke-virtual {v3, v0, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :cond_2
    :goto_2
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    const-string/jumbo v4, ""

    invoke-virtual {v0, v4}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->showProgressDialog(Ljava/lang/String;)V

    new-instance v0, Lcom/waiqin365/lightapp/im/a/a/a;

    invoke-virtual {v3}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v0, v1, v2, v3}, Lcom/waiqin365/lightapp/im/a/a/a;-><init>(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;)V

    new-instance v1, Lcom/waiqin365/lightapp/im/a/b;

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    iget-object v2, v2, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->d:Landroid/os/Handler;

    invoke-direct {v1, v2, v0}, Lcom/waiqin365/lightapp/im/a/b;-><init>(Landroid/os/Handler;Lcom/waiqin365/lightapp/im/a/c;)V

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/im/a/b;->start()V

    goto/16 :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_2

    :pswitch_1
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->dismissProgressDialog()V

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/im/a/a/d;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/a/a/d;->b()Z

    move-result v1

    if-eqz v1, :cond_3

    iget-object v0, v0, Lcom/waiqin365/lightapp/im/a/a/d;->d:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_3

    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cj;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/cj;-><init>(Lcom/waiqin365/lightapp/im/activity/ci;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    goto/16 :goto_0

    :cond_3
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->dismissProgressDialog()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/ci;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    const v2, 0x7f080020

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    invoke-static {v0, v1, v2}, Lcom/waiqin365/lightapp/view/dk;->a(Landroid/content/Context;Ljava/lang/CharSequence;I)V

    goto/16 :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method
